package com.atguigu.gmall.item.client;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.item.client.impl.ItemDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author Sanmier
 * @create 2020-12-07 9:28
 */

//将ItemApiController 中的数据接口发布到feign上

@FeignClient(value = "service-item",fallback = ItemDegradeFeignClient.class)
public interface ItemFeignClient {


    //获取sku详情信息
    @GetMapping("/api/item/{skuId}")
    Result getItem(@PathVariable Long skuId);
}
